//获取项目根路径
var contextPath=location.pathname;
var arr = contextPath.split("/");
contextPath='/'+arr[1];